{
  "properties" : { },
  "id" : "b3c68ea1ab974196a512b2538b831c33",
  "script" : null,
  "groupId" : "b56a24453f064cf8bf33b13a4a2a6d91",
  "name" : "查询运行负载列表",
  "createTime" : 1727071149359,
  "updateTime" : 1726276221978,
  "lock" : "0",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "getRunningMessage",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\"current\":1,\"size\":30,\"ip\":\"\",\"type\":\"1\"}",
  "headers" : [ {
    "name" : "blade-auth",
    "value" : "bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJpc3N1c2VyIiwiYXVkIjoiYXVkaWVuY2UiLCJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJyb2xlX25hbWUiOiJhZG1pbmlzdHJhdG9yIiwicG9zdF9pZCI6IjExMjM1OTg4MTc3Mzg2NzUyMDEiLCJ1c2VyX2lkIjoiMTEyMzU5ODgyMTczODY3NTIwMSIsInJvbGVfaWQiOiIxMTIzNTk4ODE2NzM4Njc1MjAxIiwidXNlcl9uYW1lIjoiYWRtaW4iLCJuaWNrX25hbWUiOiLnrqHnkIblkZgiLCJkZXRhaWwiOnsidHlwZSI6IndlYiJ9LCJ0b2tlbl90eXBlIjoiYWNjZXNzX3Rva2VuIiwiZGVwdF9pZCI6IjE3OTM0OTQ0MTgwODMzMTk4MTAiLCJhY2NvdW50IjoiYWRtaW4iLCJjbGllbnRfaWQiOiJzYWJlciIsImV4cCI6MTcyNjI3ODU3MSwibmJmIjoxNzI2Mjc0OTcxfQ.ou1t5_5THA_VbKnD7uhpvNOKgtBSQKvuvBcUQ6BA9Sz4100GSumnsEzmb8L8iaDSDZbvn2-qmWMIR84MI_n1dA",
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  } ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": []\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }
}
================================
import java.lang.reflect.Array
import redis
import cn.hutool.core.collection.CollectionUtil


var token = header.get("blade-auth")::string;
var dccId =  redis.get(token.substring(7))

var sql = """
SELECT
	id device_id,device_name,ip
FROM
	ndmp_device 
WHERE
	mtnc_status = 0    and dcc_id=#{dccId}
    <if test="body.deviceName != null and body.deviceName!= ''">
        AND ( device_name like concat('%',#{body.deviceName},'%')  OR
         device_alias like concat('%',#{body.deviceName},'%')  or
        F_PINYIN(device_name) like UPPER(concat('%',#{body.deviceName},'%'))  or 
          F_PINYIN(device_alias) like UPPER(concat('%',#{body.deviceName},'%'))
         )
    </if>
     <if test="body.ip != null and body.ip!= ''">
        AND   ip like concat('%',#{body.ip},'%')   
    </if>
	
"""
var res = db.page(sql,body.size ,body.current-1)

var fileds = Arrays.asList("cpuUsage", "memUsage", "delayTime", "packetLoss")

if(CollectionUtil.isEmpty( res.records)){
return new ArrayList()
}


for (vo in res.records) {
    var pointSoftVersion = redis.getPoint(vo.deviceId, fileds);

    if (CollectionUtil.isNotEmpty(pointSoftVersion)) {
        var cpuUsage = softVersion = pointSoftVersion[0].cpuUsage
        var memUsage = softVersion = pointSoftVersion[0].memUsage
        var delayTime = softVersion = pointSoftVersion[0].delayTime
        var packetLoss = softVersion = pointSoftVersion[0].packetLoss
        vo.cpuUsage = cpuUsage;
        vo.memUsage = memUsage;
        vo.delayTime = delayTime;
        vo.packetLoss = packetLoss;
    }

}

return res